package com.learn.controller;

import com.learn.service.SendEmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: learn-parent
 * @description
 * @author: luffy
 * @create: 2020-09-17 22:11
 */
@RestController
@RequestMapping("/email")
public class SendEmailController {
    @Autowired
    private SendEmailService sendEmailService;


    @GetMapping("/{emailAddress}/{code}")
    public boolean sendEmail(@PathVariable String emailAddress,@PathVariable String code) {
        return sendEmailService.sendEmail(emailAddress, code);
    }
}
